<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<UlyssesAgenda.Repositories.Regions.RegionFileInfo>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Index</h2>

    <table>
        <tr>
            <th></th>            
            <th>
                Name
            </th>
            <th>
                Submitter
            </th>
            <th>
                Filename
            </th>
            <th></th>            
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%= Html.ActionLink("Edit", "Edit", new {  id=item.Filename  }) %> |
                <%= Html.ActionLink("Details", "Details", new {  id=item.Filename})%>
            </td>
            <td>
                <%= Html.Encode(item.Name) %>
            </td>
            <td>
                <%= Html.Encode(item.Submitter) %>
            </td>
            <td>
                <%= Html.Encode(item.Filename) %>
            </td>
            <td>            
            <% using (Html.BeginForm("Delete", "Regions", FormMethod.Post)) { %>
                <input type="submit" value="Delete" />
                <%= Html.Hidden("id", item.Filename) %>
            <% } %>
            </td>
        </tr>
    
    <% } %>

    </table>

    <p>
        <%= Html.ActionLink("Create New", "Create") %>
    </p>

</asp:Content>

